<?php

namespace App\RBAC;

use Illuminate\Database\Eloquent\Model;

class Operation extends Model
{
    protected $fillable = [
        'name', 'description',
    ];

    public function resources()
    {
        return $this->belongsToMany('App\RBAC\Resource','privileges');
    }

    public function roles()
    {
        return $this->belongsToMany('App\RBAC\Role','role_operations');
    }
}
